package com.shambles.manage2.tkmapper.mapper;

import com.shambles.manage2.tkmapper.entity.AdmissionRegister;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.additional.insert.InsertListMapper;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface AdmissionRegisterMapper extends Mapper<AdmissionRegister>, InsertListMapper<AdmissionRegister> {
    @Delete("delete FROM admission_register WHERE guid = '${guid}'")
    void deleteByGuid(String guid);

    @Update("UPDATE admission_register SET status = ${status} WHERE guid = '${guid}'"  )
    void updateState(@Param("status") int status , @Param("guid") String guid);
    @Select("SELECT * FROM admission_register WHERE status = ${status}")
    List<AdmissionRegister> selectByStatus(@Param("status") Integer status);
}